@model IEnumerable<Bk.Models.BlogInfo>
@{
    Response.ContentType = "text/html; charset=utf-8";
}

@if (Model != null && Model.Any())
{
    foreach (var post in Model)
    {
        <div class="blog-post">
            <h3>@post.title</h3>
            <div class="post-meta">
                <span class="post-category"> @post.categoriesName</span>
                <span class="post-author"> @(post.UserInfo?.UserName ?? "未知用户")</span>
                <span class="post-date"> @post.PushDate</span>

            </div>
            <p>@post.Substance</p>
            <!-- 点赞图标和计数 -->
            <img class="like-container"
                 data-id="@post.BId"
                 src="~/Image/Like.png"
                 style="width:20px;">
            <span id="likeCount@post.BId">@post.Likes</span>
        </div>
    }
}
else
{
    <div class="blog-post">
        <p style="text-align: center; color: #666; padding: 40px; font-size: 16px;">
            @*暂无相关文章*@
            No Data
        </p>
    </div>
}
